<template>
  <div>
    <hr>
    <p>Child02</p>
    <p>{{count}}</p>
    <p>{{text}}</p>
    <p>通过mapGetters获取getters</p>
    <p>{{getCountBiggerThan20}}</p>
  </div>
</template>

<script>
  //用 mapState 获取vuex 属性

  import { mapState, mapGetters } from "vuex"

  export default {
    name: "Child02",
    computed: {
      ...mapState(["count","text"]),
      ...mapGetters(['getCountBiggerThan20'])
    }
  }
</script>

<style scoped>

</style>
